<mat-card class="page-title">
    <span>我的收藏</span>

    <div class="btn-toolbar float-right" role="toolbar">
        <button mat-icon-button (click)="refresh()" matTooltip="刷新">
            <mat-icon color="primary">refresh</mat-icon>
        </button>
    </div>
</mat-card>

<mat-card>
    <div class="table-responsive">
        <table class="table">
            <thead>
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
                <th jhiSortBy="id"><span>序号</span> <span class="fa fa-sort"></span></th>
                <th><span>模型UUID</span></th>
                <th jhiSortBy="solutionName"><span>模型名称</span> <span class="fa fa-sort"></span></th>
                <th jhiSortBy="solutionAuthor"><span>作者</span> <span class="fa fa-sort"></span></th>
                <th jhiSortBy="solutionCreatedDate"><span>创建日期</span> <span class="fa fa-sort"></span></th>
                <th jhiSortBy="favoriteDate"><span>收藏日期</span> <span class="fa fa-sort"></span></th>
                <th><span>取消收藏</span></th>
            </tr>
            </thead>
            <tbody *ngIf="solutionFavorites">
                <tr *ngFor="let solutionFavorite of solutionFavorites; trackBy: trackIdentity">
                    <td>{{solutionFavorite.id}}</td>
                    <td><a (click)="viewSolution(solutionFavorite.solutionUuid)">{{solutionFavorite.solutionUuid}}</a></td>
                    <td><a (click)="viewSolution(solutionFavorite.solutionUuid)">{{solutionFavorite.solutionName}}</a></td>
                    <td>{{solutionFavorite.solutionAuthor}}</td>
                    <td>{{solutionFavorite.solutionCreatedDate | date:'yyyy-MM-dd'}}</td>
                    <td>{{solutionFavorite.favoriteDate | date:'yyyy-MM-dd'}}</td>
                    <td><a (click)="deleteFavorite(solutionFavorite.id)"><span class="fa fa-remove" style="color: red"></span></a></td>
                </tr>
            </tbody>
        </table>
    </div>
    <br>
    <div>
        <mat-paginator #paginator
                       [length]="totalItems"
                       [pageSize]="itemsPerPage"
                       [pageSizeOptions]="pageSizeOptions"
                       (page)="reloadPage($event)"
                       showFirstLastButtons>
        </mat-paginator>
    </div>
</mat-card>


